<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Areas/MvcWiki.Web.Prototype.MVC2P1.Wiki/Shared/Wiki.Master" Inherits="System.Web.Mvc.ViewPage<WikiPageViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_MvcWikiTitle" runat="server">
	<%= Model.Name %> page revisions
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder_MvcWikiMainHeader" runat="server">
    <h2><%= Html.RouteLink(Model.Name, new { controller = "wikipage", action = "show", @namespace = Model.Namespace, page = Model.Name, revision = "" }) %></h2>
    <p>
        Namespace <strong><%= Model.Namespace %></strong>
        &nbsp;|&nbsp;<%= Html.ActionLink("[Edit]", "edit", new { @namespace = Model.Namespace, page = Model.Name }) %>
    </p>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_MvcWikiMainContent" runat="server">
    <% if (Model.HasContent) { %>
        <ul>
            <% foreach (var revision in Model.Revisions) { %>
            <li>
                <%= Html.RouteLink(revision.Key, new { controller = "wikipage", action = "show", @namespace = Model.Namespace, page = Model.Name, revision = revision.Value })%>
            </li>
            <% } %>
        </ul>
    <% } %>
</asp:Content>